// 更改用户状态信息
export const userStatus = (state, user, token) => {
  if (user) {
    state.currentUser = user;
    state.isLogin = true;
    state.token = token;
  } else if (!user) {
    state.currentUser = null;
    state.isLogin = false;
    state.token = "";
  }
};

export const userToken = (state, userToken) => {
  if (userToken) {
    state.token = userToken;
  } else {
    state.token = null;
  }
};
